import { MenuItem } from "@/components/types/SidebarNav";
import { defineStore } from "pinia";

export const useMenusStore = defineStore('menu', {
  state: () => ({
    menus: [
      {
        id: 1,
        name: '首页',
        icon: 'fa-tachometer-alt',
        path: '/home/dashboard'
      },
      {
        id: 2,
        name: '用户管理',
        icon: 'fa-users',
        routeName: 'users'
      },
      {
        id: 3,
        name: '角色管理',
        icon: 'fa-tools',
        routeName: 'roles'
      },
      {
        id: 4,
        name: '菜单管理',
        icon: 'fa-bars',
        routeName: 'menus'
      }
    ] as MenuItem[]
  }),
  persist: true // 持久化
})
